<?

function FFPCountry($value, $name = "Country"){

$Source1 = array();  
$Source2 = array();  


array_push($Source1,"AF");
array_push($Source2,"Afghanistan");
array_push($Source1,"AL");
array_push($Source2,"Albania");
array_push($Source1,"DZ");
array_push($Source2,"Algeria");
array_push($Source1,"AS");
array_push($Source2,"American Samoa");
array_push($Source1,"AD");
array_push($Source2,"Andorra");
array_push($Source1,"AO");
array_push($Source2,"Angola");
array_push($Source1,"AI");
array_push($Source2,"Anguilla");
array_push($Source1,"AQ");
array_push($Source2,"Antarctica");
array_push($Source1,"AG");
array_push($Source2,"Antigua and Barbuda");
array_push($Source1,"AR");
array_push($Source2,"Argentina");
array_push($Source1,"AM");
array_push($Source2,"Armenia");
array_push($Source1,"AW");
array_push($Source2,"Aruba");
array_push($Source1,"AU");
array_push($Source2,"Australia");
array_push($Source1,"AT");
array_push($Source2,"Austria");
array_push($Source1,"AZ");
array_push($Source2,"Azerbaijan");
array_push($Source1,"BS");
array_push($Source2,"Bahamas");
array_push($Source1,"BH");
array_push($Source2,"Bahrain");
array_push($Source1,"BD");
array_push($Source2,"Bangladesh");
array_push($Source1,"BB");
array_push($Source2,"Barbados");
array_push($Source1,"BY");
array_push($Source2,"Belarus");
array_push($Source1,"BE");
array_push($Source2,"Belgium");
array_push($Source1,"BZ");
array_push($Source2,"Belize");
array_push($Source1,"BJ");
array_push($Source2,"Benin");
array_push($Source1,"BM");
array_push($Source2,"Bermuda");
array_push($Source1,"BT");
array_push($Source2,"Bhutan");
array_push($Source1,"BO");
array_push($Source2,"Bolivia");
array_push($Source1,"BA");
array_push($Source2,"Bosnia and Herzegowina");
array_push($Source1,"BW");
array_push($Source2,"Botswana");
array_push($Source1,"BV");
array_push($Source2,"Bouvet Island");
array_push($Source1,"BR");
array_push($Source2,"Brazil");
array_push($Source1,"IO");
array_push($Source2,"British Indian Ocean Territory");
array_push($Source1,"BN");
array_push($Source2,"Brunei Darussalam");
array_push($Source1,"BG");
array_push($Source2,"Bulgaria");
array_push($Source1,"BF");
array_push($Source2,"Burkina Faso");
array_push($Source1,"BI");
array_push($Source2,"Burundi");
array_push($Source1,"KH");
array_push($Source2,"Cambodia");
array_push($Source1,"CM");
array_push($Source2,"Cameroon");
array_push($Source1,"CA");
array_push($Source2,"Canada");
array_push($Source1,"CV");
array_push($Source2,"Cape Verde");
array_push($Source1,"KY");
array_push($Source2,"Cayman Islands");
array_push($Source1,"CF");
array_push($Source2,"Central African Republic");
array_push($Source1,"TD");
array_push($Source2,"Chad");
array_push($Source1,"CL");
array_push($Source2,"Chile");
array_push($Source1,"CN");
array_push($Source2,"China");
array_push($Source1,"CX");
array_push($Source2,"Christmas Island");
array_push($Source1,"CC");
array_push($Source2,"Cocos (Keeling) Islands");
array_push($Source1,"CO");
array_push($Source2,"Colombia");
array_push($Source1,"KM");
array_push($Source2,"Comoros");
array_push($Source1,"CG");
array_push($Source2,"Congo");
array_push($Source1,"CK");
array_push($Source2,"Cook Islands");
array_push($Source1,"CR");
array_push($Source2,"Costa Rica");
array_push($Source1,"CI");
array_push($Source2,"Cote D'Ivoire");
array_push($Source1,"HR");
array_push($Source2,"Croatia (local name: Hrvatska)");;
array_push($Source1,"CU");
array_push($Source2,"Cuba");
array_push($Source1,"CY");
array_push($Source2,"Cyprus");
array_push($Source1,"CZ");
array_push($Source2,"Czech Republic");
array_push($Source1,"DK");
array_push($Source2,"Denmark");
array_push($Source1,"DJ");
array_push($Source2,"Djibouti");
array_push($Source1,"DM");
array_push($Source2,"Dominica");
array_push($Source1,"DO");
array_push($Source2,"Dominican Republic");
array_push($Source1,"TP");
array_push($Source2,"East Timor");
array_push($Source1,"EC");
array_push($Source2,"Ecuador");
array_push($Source1,"EG");
array_push($Source2,"Egypt");
array_push($Source1,"SV");
array_push($Source2,"El Salvador");
array_push($Source1,"GQ");
array_push($Source2,"Equatorial Guinea");
array_push($Source1,"ER");
array_push($Source2,"Eritrea");
array_push($Source1,"EE");
array_push($Source2,"Estonia");
array_push($Source1,"ET");
array_push($Source2,"Ethiopia");
array_push($Source1,"FK");
array_push($Source2,"Falkland Islands (Malvinas)");;
array_push($Source1,"FO");
array_push($Source2,"Faroe Islands");
array_push($Source1,"FJ");
array_push($Source2,"Fiji");
array_push($Source1,"FI");
array_push($Source2,"Finland");
array_push($Source1,"FR");
array_push($Source2,"France");
array_push($Source1,"FX");
array_push($Source2,"France Metropolitan");
array_push($Source1,"GF");
array_push($Source2,"French Guiana");
array_push($Source1,"PF");
array_push($Source2,"French Polynesia");
array_push($Source1,"TF");
array_push($Source2,"French Southern Territories");
array_push($Source1,"GA");
array_push($Source2,"Gabon");
array_push($Source1,"GM");
array_push($Source2,"Gambia");
array_push($Source1,"GE");
array_push($Source2,"Georgia");
array_push($Source1,"DE");
array_push($Source2,"Germany");
array_push($Source1,"GH");
array_push($Source2,"Ghana");
array_push($Source1,"GI");
array_push($Source2,"Gibraltar");
array_push($Source1,"GR");
array_push($Source2,"Greece");
array_push($Source1,"GL");
array_push($Source2,"Greenland");
array_push($Source1,"GD");
array_push($Source2,"Grenada");
array_push($Source1,"GP");
array_push($Source2,"Guadeloupe");
array_push($Source1,"GU");
array_push($Source2,"Guam");
array_push($Source1,"GT");
array_push($Source2,"Guatemala");
array_push($Source1,"GN");
array_push($Source2,"Guinea");
array_push($Source1,"GW");
array_push($Source2,"Guinea-Bissau");
array_push($Source1,"GY");
array_push($Source2,"Guyana");
array_push($Source1,"HT");
array_push($Source2,"Haiti");
array_push($Source1,"HM");
array_push($Source2,"Heard and Mc Donald Islands");
array_push($Source1,"HN");
array_push($Source2,"Honduras");
array_push($Source1,"HK");
array_push($Source2,"Hong Kong");
array_push($Source1,"HU");
array_push($Source2,"Hungary");
array_push($Source1,"IS");
array_push($Source2,"Iceland");
array_push($Source1,"IN");
array_push($Source2,"India");
array_push($Source1,"ID");
array_push($Source2,"Indonesia");
array_push($Source1,"IR");
array_push($Source2,"Iran (Islamic Republic of)");;
array_push($Source1,"IQ");
array_push($Source2,"Iraq");
array_push($Source1,"IE");
array_push($Source2,"Ireland");
array_push($Source1,"IL");
array_push($Source2,"Israel");
array_push($Source1,"IT");
array_push($Source2,"Italy");
array_push($Source1,"JM");
array_push($Source2,"Jamaica");
array_push($Source1,"JP");
array_push($Source2,"Japan");
array_push($Source1,"JO");
array_push($Source2,"Jordan");
array_push($Source1,"KZ");
array_push($Source2,"Kazakhstan");
array_push($Source1,"KE");
array_push($Source2,"Kenya");
array_push($Source1,"KI");
array_push($Source2,"Kiribati");
array_push($Source1,"KW");
array_push($Source2,"Kuwait");
array_push($Source1,"KG");
array_push($Source2,"Kyrgyzstan");
array_push($Source1,"LA");
array_push($Source2,"Lao People's Democratic Republic");
array_push($Source1,"LV");
array_push($Source2,"Latvia");
array_push($Source1,"LB");
array_push($Source2,"Lebanon");
array_push($Source1,"LS");
array_push($Source2,"Lesotho");
array_push($Source1,"LR");
array_push($Source2,"Liberia");
array_push($Source1,"LY");
array_push($Source2,"Libyan Arab Jamahiriya");
array_push($Source1,"LI");
array_push($Source2,"Liechtenstein");
array_push($Source1,"LT");
array_push($Source2,"Lithuania");
array_push($Source1,"LU");
array_push($Source2,"Luxembourg");
array_push($Source1,"MO");
array_push($Source2,"Macao");;
array_push($Source1,"MK");
array_push($Source2,"Macedonia");
array_push($Source1,"MG");
array_push($Source2,"Madagascar");
array_push($Source1,"MW");
array_push($Source2,"Malawi");
array_push($Source1,"MY");
array_push($Source2,"Malaysia");
array_push($Source1,"MV");
array_push($Source2,"Maldives");
array_push($Source1,"ML");
array_push($Source2,"Mali");
array_push($Source1,"MT");
array_push($Source2,"Malta");
array_push($Source1,"MH");
array_push($Source2,"Marshall Islands");
array_push($Source1,"MQ");
array_push($Source2,"Martinique");
array_push($Source1,"MR");
array_push($Source2,"Mauritania");
array_push($Source1,"MU");
array_push($Source2,"Mauritius");
array_push($Source1,"YT");
array_push($Source2,"Mayotte");
array_push($Source1,"MX");
array_push($Source2,"Mexico");
array_push($Source1,"FM");
array_push($Source2,"Micronesia");
array_push($Source1,"MD");
array_push($Source2,"Moldova");
array_push($Source1,"MC");
array_push($Source2,"Monaco");
array_push($Source1,"MN");
array_push($Source2,"Mongolia");
array_push($Source1,"MS");
array_push($Source2,"Montserrat");
array_push($Source1,"MA");
array_push($Source2,"Morocco");
array_push($Source1,"MZ");
array_push($Source2,"Mozambique");
array_push($Source1,"MM");
array_push($Source2,"Myanmar");
array_push($Source1,"NA");
array_push($Source2,"Namibia");
array_push($Source1,"NR");
array_push($Source2,"Nauru");
array_push($Source1,"NP");
array_push($Source2,"Nepal");
array_push($Source1,"NL");
array_push($Source2,"Netherlands");
array_push($Source1,"AN");
array_push($Source2,"Netherlands Antilles");
array_push($Source1,"NC");
array_push($Source2,"New Caledonia");
array_push($Source1,"NZ");
array_push($Source2,"New Zealand");
array_push($Source1,"NI");
array_push($Source2,"Nicaragua");
array_push($Source1,"NE");
array_push($Source2,"Niger");
array_push($Source1,"NG");
array_push($Source2,"Nigeria");
array_push($Source1,"NU");
array_push($Source2,"Niue");
array_push($Source1,"NF");
array_push($Source2,"Norfolk Island");
array_push($Source1,"KP");
array_push($Source2,"North Korea");
array_push($Source1,"MP");
array_push($Source2,"Northern Mariana Islands");
array_push($Source1,"NO");
array_push($Source2,"Norway");
array_push($Source1,"OM");
array_push($Source2,"Oman");
array_push($Source1,"PK");
array_push($Source2,"Pakistan");
array_push($Source1,"PW");
array_push($Source2,"Palau");
array_push($Source1,"PA");
array_push($Source2,"Panama");
array_push($Source1,"PG");
array_push($Source2,"Papua New Guinea");
array_push($Source1,"PY");
array_push($Source2,"Paraguay");
array_push($Source1,"PE");
array_push($Source2,"Peru");
array_push($Source1,"PH");
array_push($Source2,"Philippines");
array_push($Source1,"PN");
array_push($Source2,"Pitcairn");
array_push($Source1,"PL");
array_push($Source2,"Poland");
array_push($Source1,"PT");
array_push($Source2,"Portugal");
array_push($Source1,"PR");
array_push($Source2,"Puerto Rico");
array_push($Source1,"QA");
array_push($Source2,"Qatar");
array_push($Source1,"RE");
array_push($Source2,"Reunion");
array_push($Source1,"RO");
array_push($Source2,"Romania");
array_push($Source1,"RU");
array_push($Source2,"Russian Federation");
array_push($Source1,"RW");
array_push($Source2,"Rwanda");
array_push($Source1,"KN");
array_push($Source2,"Saint Kitts and Nevis");
array_push($Source1,"LC");
array_push($Source2,"Saint Lucia");
array_push($Source1,"VC");
array_push($Source2,"Saint Vincent and the Grenadines");
array_push($Source1,"WS");
array_push($Source2,"Samoa");
array_push($Source1,"SM");
array_push($Source2,"San Marino");
array_push($Source1,"ST");
array_push($Source2,"Sao Tome and Principe");
array_push($Source1,"SA");
array_push($Source2,"Saudi Arabia");
array_push($Source1,"SN");
array_push($Source2,"Senegal");
array_push($Source1,"SC");
array_push($Source2,"Seychelles");
array_push($Source1,"SL");
array_push($Source2,"Sierra Leone");
array_push($Source1,"SG");
array_push($Source2,"Singapore");
array_push($Source1,"SK");
array_push($Source2,"Slovakia (Slovak Republic)");;
array_push($Source1,"SI");
array_push($Source2,"Slovenia");
array_push($Source1,"SB");
array_push($Source2,"Solomon Islands");
array_push($Source1,"SO");
array_push($Source2,"Somalia");
array_push($Source1,"ZA");
array_push($Source2,"South Africa");
array_push($Source1,"KR");
array_push($Source2,"South Korea");
array_push($Source1,"ES");
array_push($Source2,"Spain");
array_push($Source1,"LK");
array_push($Source2,"Sri Lanka");
array_push($Source1,"SH");
array_push($Source2,"St. Helena");
array_push($Source1,"PM");
array_push($Source2,"St. Pierre and Miquelon");
array_push($Source1,"SD");
array_push($Source2,"Sudan");
array_push($Source1,"SR");
array_push($Source2,"Suriname");
array_push($Source1,"SJ");
array_push($Source2,"Svalbard and Jan Mayen Islands");
array_push($Source1,"SZ");
array_push($Source2,"Swaziland");
array_push($Source1,"SE");
array_push($Source2,"Sweden");
array_push($Source1,"CH");
array_push($Source2,"Switzerland");
array_push($Source1,"SY");
array_push($Source2,"Syrian Arab Republic");
array_push($Source1,"TW");
array_push($Source2,"Taiwan");
array_push($Source1,"TJ");
array_push($Source2,"Tajikistan");
array_push($Source1,"TZ");
array_push($Source2,"Tanzania");
array_push($Source1,"TH");
array_push($Source2,"Thailand");
array_push($Source1,"TG");
array_push($Source2,"Togo");
array_push($Source1,"TK");
array_push($Source2,"Tokelau");
array_push($Source1,"TO");
array_push($Source2,"Tonga");
array_push($Source1,"TT");
array_push($Source2,"Trinidad and Tobago");
array_push($Source1,"TN");
array_push($Source2,"Tunisia");
array_push($Source1,"TR");
array_push($Source2,"Turkey");
array_push($Source1,"TM");
array_push($Source2,"Turkmenistan");
array_push($Source1,"TC");
array_push($Source2,"Turks and Caicos Islands");
array_push($Source1,"TV");
array_push($Source2,"Tuvalu");
array_push($Source1,"UG");
array_push($Source2,"Uganda");
array_push($Source1,"UA");
array_push($Source2,"Ukraine");
array_push($Source1,"AE");
array_push($Source2,"United Arab Emirates");
array_push($Source1,"UK");
array_push($Source2,"United Kingdom");
array_push($Source1,"US");
array_push($Source2,"United States");
array_push($Source1,"UM");
array_push($Source2,"United States Minor Outlying Islands");
array_push($Source1,"UY");
array_push($Source2,"Uruguay");
array_push($Source1,"UZ");
array_push($Source2,"Uzbekistan");
array_push($Source1,"VU");
array_push($Source2,"Vanuatu");
array_push($Source1,"VA");
array_push($Source2,"Vatican City State (Holy See)");;
array_push($Source1,"VE");
array_push($Source2,"Venezuela");
array_push($Source1,"VN");
array_push($Source2,"Viet NAM");
array_push($Source1,"VG");
array_push($Source2,"Virgin Islands (British)");;
array_push($Source1,"VI");
array_push($Source2,"Virgin Islands (U.S.)");;
array_push($Source1,"WF");
array_push($Source2,"Wallis And Futuna Islands");
array_push($Source1,"EH");
array_push($Source2,"Western Sahara");
array_push($Source1,"YE");
array_push($Source2,"Yemen");
array_push($Source1,"YU");
array_push($Source2,"Yugoslavia");
array_push($Source1,"ZR");
array_push($Source2,"Zaire");
array_push($Source1,"ZM");
array_push($Source2,"Zambia");
array_push($Source1,"ZW");
array_push($Source2,"Zimbabwe");
array_push($Source1,"Other");
array_push($Source2,"Others");

if ($value=="") $value1="US";

$rtn = "";

$rtn = "<select name=\"$name\" class=\"select\">";

  for ($i=0;$i<count($Source2);$i++){
  
    if (strtolower($Source2[$i])==trim(strtolower($value))){
    
      $rtn .= "<option value=\"$Source2[$i]\" selected >$Source2[$i]\n";}
      
    else{
    
      $rtn .= "<option value=\"$Source2[$i]\" >$Source2[$i]\n";}
      
  }

$rtn .= "</select>";
	return $rtn;
}
	

?>
